bitkeeper revision 1.1159.159.1 (418a0f05lDwVyI3ppkjGpLANxqZFeQ)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Thu, 4 Nov 2004 11:14:13 +0000 (11:14 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Thu, 4 Nov 2004 11:14:13 +0000 (11:14 +0000)
Update NetBSD to 2.0 release snapshot from 20041103.

buildconfigs/mk.netbsd-2.0-xenU
netbsd-2.0-xen-sparse/sys/arch/xen/conf/XEN
netbsd-2.0-xen-sparse/sys/arch/xen/include/if_xennetvar.h
netbsd-2.0-xen-sparse/sys/arch/xen/include/xbdvar.h
netbsd-2.0-xen-sparse/sys/arch/xen/xen/clock.c
netbsd-2.0-xen-sparse/sys/arch/xen/xen/if_xennet.c
netbsd-2.0-xen-sparse/sys/arch/xen/xen/xbd.c

index 53e02b739ffe221fadb41467b9b5a783deddd81e..a34edb2c88d41014bb831a39967de6f2154aaed1 100644 (file)
@@ -1,6 +1,6 @@
 
 NETBSD_RELEASE   ?= 2.0
-NETBSD_CVSSNAP   ?= 20040906
+NETBSD_CVSSNAP   ?= 20041103
 
 EXTRAVERSION = xenU
 
index eece41d429124ed3a20d5410a7c466dc9efbe428..e9b2cd83a38d5ced3f985e2f25da7e6f5dfda5d4 100644 (file)
@@ -28,7 +28,7 @@ options       I686_CPU
 options                INSECURE        # disable kernel security levels - X needs this
 
 options        RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
-#options       NTP             # NTP phase/frequency locked loop
+options        NTP             # NTP phase/frequency locked loop
 
 options        KTRACE          # system call tracing via ktrace(1)
 #options       SYSTRACE        # system call vetting via systrace(1)
index 5e84f5af8690742444ea632b4d55b501b0a27276..da95163afd1239b1a98e83057580672bce9dd71e 100644 (file)
@@ -94,6 +94,10 @@ struct xennet_softc {
        union xennet_bufarray   sc_rx_bufa[NETIF_TX_RING_SIZE];
 
        SLIST_HEAD(, xennet_txbuf)      sc_tx_bufs;
+
+#if NRND > 0
+       rndsource_element_t     sc_rnd_source;
+#endif
 };
 
 struct xennet_attach_args {
index 089d365a0dca915245e3a01369fbc188cf744202..4a53ae71e23d771147fff43c4e45f8de6c0fdc89 100644 (file)
@@ -42,6 +42,9 @@ struct xbd_softc {
        struct dk_intf          *sc_di;         /* pseudo-disk interface */
        struct simplelock       sc_slock;       /* our lock */
        int                     sc_shutdown;    /* about to be removed */
+#if NRND > 0
+       rndsource_element_t     sc_rnd_source;
+#endif
 };
 
 struct xbd_attach_args {
index 2db3332d21b4c95d258abd3504baa5438b150a53..ef461d280a2349a09e8605b64e76b8c0c6067c9b 100644 (file)
@@ -184,7 +184,7 @@ startrtclock()
 void
 xen_delay(int n)
 {
-       u_int64_t when;
+       uint64_t when;
 
        get_time_values_from_xen();
        when = shadow_system_time + n * 1000;
index 1670da4ea392b35d89af31c212975a90a8e6555d..9d8618923c18fd9843e3fb9efcc88b0749ea803a 100644 (file)
@@ -36,6 +36,7 @@
 __KERNEL_RCSID(0, "$NetBSD: if_xennet.c,v 1.1.2.1 2004/05/22 15:58:29 he Exp $");
 
 #include "opt_inet.h"
+#include "rnd.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -525,7 +526,7 @@ xennet_interface_status_change(netif_fe_interface_status_t *status)
                    ether_sprintf(sc->sc_enaddr));
 
 #if NRND > 0
-               rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
+               rnd_attach_source(&sc->sc_rnd_source, sc->sc_dev.dv_xname,
                    RND_TYPE_NET, 0);
 #endif
                break;
@@ -647,6 +648,10 @@ xen_network_handler(void *arg)
 
        network_tx_buf_gc(sc);
 
+#if NRND > 0
+       rnd_add_uint32(&sc->sc_rnd_source, sc->sc_rx_resp_cons);
+#endif
+
  again:
        for (ringidx = sc->sc_rx_resp_cons;
             ringidx != sc->sc_rx->resp_prod;
@@ -970,6 +975,10 @@ xennet_start(struct ifnet *ifp)
                panic("%s: No packet to start", sc->sc_dev.dv_xname);
 #endif
 
+#if NRND > 0
+       rnd_add_uint32(&sc->sc_rnd_source, sc->sc_tx->req_prod);
+#endif
+
        if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
                return;
 
index a8034a211620383bdb0dc8fb733663a5a4d89f70..23a96241d3772b7b188ef2f7ea9e00c62125b965 100644 (file)
@@ -36,6 +36,7 @@
 __KERNEL_RCSID(0, "$NetBSD: xbd.c,v 1.9.2.1 2004/05/22 15:59:11 he Exp $");
 
 #include "xbd.h"
+#include "rnd.h"
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -61,6 +62,10 @@ __KERNEL_RCSID(0, "$NetBSD: xbd.c,v 1.9.2.1 2004/05/22 15:59:11 he Exp $");
 
 #include <uvm/uvm.h>
 
+#if NRND > 0
+#include <sys/rnd.h>
+#endif
+
 #include <dev/dkvar.h>
 #include <machine/xbdvar.h>
 
@@ -1002,6 +1007,11 @@ xbd_attach(struct device *parent, struct device *self, void *aux)
                    NULL, 0, &xs->sc_xd_device, 0,
                    CTL_CREATE, CTL_EOL);
        }
+
+#if NRND > 0
+       rnd_attach_source(&xs->sc_rnd_source, xs->sc_dev.dv_xname,
+           RND_TYPE_DISK, 0);
+#endif
 }
 
 static int
@@ -1231,10 +1241,15 @@ xbdresume(void)
                                if (pxr->xr_aligned)
                                        unmap_align(pxr);
                                PUT_XBDREQ(pxr);
-                               if (xs)
+                               if (xs) {
                                        disk_unbusy(&xs->sc_dksc.sc_dkdev,
                                            (bp->b_bcount - bp->b_resid),
                                            (bp->b_flags & B_READ));
+#if NRND > 0
+                                       rnd_add_uint32(&xs->sc_rnd_source,
+                                           bp->b_blkno);
+#endif
+                               }
                                biodone(bp);
                        }
                        continue;
@@ -1405,10 +1420,15 @@ xbd_response_handler(void *arg)
                                        unmap_align(pxr);
 
                                PUT_XBDREQ(pxr);
-                               if (xs)
+                               if (xs) {
                                        disk_unbusy(&xs->sc_dksc.sc_dkdev,
                                            (bp->b_bcount - bp->b_resid),
                                            (bp->b_flags & B_READ));
+#if NRND > 0
+                                       rnd_add_uint32(&xs->sc_rnd_source,
+                                           bp->b_blkno);
+#endif
+                               }
                                biodone(bp);
                                if (!SIMPLEQ_EMPTY(&xbdr_suspended))
                                        xbdresume();